package com.bwie.home.backstage.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.home.common.utils.PageUtils;
import com.bwie.home.common.utils.Query;

import com.bwie.home.backstage.dao.TeamUserLogDao;
import com.bwie.home.backstage.entity.TeamUserLogEntity;
import com.bwie.home.backstage.service.TeamUserLogService;


@Service("teamUserLogService")
public class TeamUserLogServiceImpl extends ServiceImpl<TeamUserLogDao, TeamUserLogEntity> implements TeamUserLogService {


    @Autowired
    private TeamUserLogDao teamUserLogDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TeamUserLogEntity> page = this.page(
                new Query<TeamUserLogEntity>().getPage(params),
                new QueryWrapper<>()
        );

        return new PageUtils(page);
    }

    @Override
    public IPage<TeamUserLogEntity> getListById(int page, int limit, int id) {
        Page<TeamUserLogEntity> pa = new Page<>(page,limit);
        return teamUserLogDao.getListById(pa,id);
    }

    @Override
    public void dptb(List<Integer> asList) {
        for (Integer i : asList) {
            teamUserLogDao.dptb(i);
        }
    }


}